<%@page import="com.shsh.safemanage.action.ActionCreator"%>
<%@page import="com.shsh.safemanage.action.WriteProblemAction"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.shsh.safemanage.util.Constants"%>
<%@page import="com.shsh.safemanage.dao.DaoCreator"%>
<%@page import="com.shsh.safemanage.dao.UserDao"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.Set"%>
<%@page import="java.util.Map"%>

<%
UserDao userDao = DaoCreator.createUserDao();
WriteProblemAction writeProblemAction = ActionCreator.createWriteProblemAction();
Map<Long, Set<Long>> manageGroupUserMap = (Map<Long, Set<Long>>) session.getAttribute(Constants.SESSION_MANAGE_GROUP_USER);
%>
<%
if (writeProblemAction.isShowShengChanManageGroup(request)) {
%>
<a href="javascript:" style="margin-left: 40px"
	onclick="openDialogPage('manage_group_userlist.jsp?id=<%=Constants.MANAGE_GROUP_ID_SHENGCHAN%>', 'manageGroupUserListDialog', '选择生产管理组人员')">生产管理组</a>
<%
if (manageGroupUserMap != null) {
	Set<Long> set = manageGroupUserMap.get(Constants.MANAGE_GROUP_ID_SHENGCHAN);
	if (set != null) {
		for (Long userID : set) {
%>
<span style="margin-left: 2px; color: black;"><%=userDao.getUserByID(userID).getName()%></span>
<%
		}
	}
}
%>
<br />
<%
}
%>

<%
if (writeProblemAction.isShowShengchanShebeiManageGroup(request)) {
%>
<a href="javascript:" style="margin-left: 40px"
	onclick="openDialogPage('manage_group_userlist.jsp?id=<%=Constants.MANAGE_GROUP_ID_SHENGCHANSHEBEI%>', 'manageGroupUserListDialog', '选择生产设备管理组人员')">生产设备管理组</a>
<%
if (manageGroupUserMap != null) {
	Set<Long> set = manageGroupUserMap.get(Constants.MANAGE_GROUP_ID_SHENGCHANSHEBEI);
	if (set != null) {
		for (Long userID : set) {
%>
<span style="margin-left: 2px; color: black;"><%=userDao.getUserByID(userID).getName()%></span>
<%
		}
	}
}
%>
<br />
<%
}
%>

<%
if (writeProblemAction.isShowJishuManageGroup(request)) {
%>
<a href="javascript:" style="margin-left: 40px"
	onclick="openDialogPage('manage_group_userlist.jsp?id=<%=Constants.MANAGE_GROUP_ID_JISHU%>', 'manageGroupUserListDialog', '选择技术管理组人员')">技术管理组</a>
<%
if (manageGroupUserMap != null) {
	Set<Long> set = manageGroupUserMap.get(Constants.MANAGE_GROUP_ID_JISHU);
	if (set != null) {
		for (Long userID : set) {
%>
<span style="margin-left: 2px; color: black;"><%=userDao.getUserByID(userID).getName()%></span>
<%
		}
	}
}
%>
<br />
<%
}
%>

<a href="javascript:" style="margin-left: 40px"
	onclick="openDialogPage('manage_group_userlist.jsp?id=<%=Constants.MANAGE_GROUP_ID_SHEBEI%>', 'manageGroupUserListDialog', '选择设备管理组人员')">设备管理组</a>
<%
if (manageGroupUserMap != null) {
	Set<Long> set = manageGroupUserMap.get(Constants.MANAGE_GROUP_ID_SHEBEI);
	if (set != null) {
		for (Long userID : set) {
%>
<span style="margin-left: 2px; color: black;"><%=userDao.getUserByID(userID).getName()%></span>
<%
		}
	}
}
%>
<br />

<%
if (writeProblemAction.isShowRedianYunxingManageGroup(request)) {
%>
<a href="javascript:" style="margin-left: 40px"
	onclick="openDialogPage('manage_group_userlist.jsp?id=<%=Constants.MANAGE_GROUP_ID_REDIANYUNXING%>', 'manageGroupUserListDialog', '选择热电运行部人员')">热电运行部</a>
<%
if (manageGroupUserMap != null) {
	Set<Long> set = manageGroupUserMap.get(Constants.MANAGE_GROUP_ID_REDIANYUNXING);
	if (set != null) {
		for (Long userID : set) {
%>
<span style="margin-left: 2px; color: black;"><%=userDao.getUserByID(userID).getName()%></span>
<%
		}
	}
}
%>
<br />
<%
}
%>

<a href="javascript:" style="margin-left: 40px"
	onclick="openDialogPage('manage_group_userlist.jsp?id=<%=Constants.MANAGE_GROUP_ID_HSE%>', 'manageGroupUserListDialog', '选择设备管理组人员')">HSE管理组</a>
<%
if (manageGroupUserMap != null) {
	Set<Long> set = manageGroupUserMap.get(Constants.MANAGE_GROUP_ID_HSE);
	if (set != null) {
		for (Long userID : set) {
%>
<span style="margin-left: 2px; color: black;"><%=userDao.getUserByID(userID).getName()%></span>
<%
		}
	}
}
%>
<br />

<a href="javascript:" style="margin-left: 40px"
	onclick="openDialogPage('manage_group_userlist.jsp?id=<%=Constants.MANAGE_GROUP_ID_ZONGHE%>', 'manageGroupUserListDialog', '选择设备管理组人员')">综合管理组</a>
<%
if (manageGroupUserMap != null) {
	Set<Long> set = manageGroupUserMap.get(Constants.MANAGE_GROUP_ID_ZONGHE);
	if (set != null) {
		for (Long userID : set) {
%>
<span style="margin-left: 2px; color: black;"><%=userDao.getUserByID(userID).getName()%></span>
<%
		}
	}
}
%>
<br />

<a href="javascript:" style="margin-left: 40px"
	onclick="openDialogPage('manage_group_userlist.jsp?id=<%=Constants.MANAGE_GROUP_ID_DANGQUN%>', 'manageGroupUserListDialog', '选择党群工作组人员')">党群工作组</a>
<%
if (manageGroupUserMap != null) {
	Set<Long> set = manageGroupUserMap.get(Constants.MANAGE_GROUP_ID_DANGQUN);
	if (set != null) {
		for (Long userID : set) {
%>
<span style="margin-left: 2px; color: black;"><%=userDao.getUserByID(userID).getName()%></span>
<%
		}
	}
}
%>
<br />

<%
if (writeProblemAction.isShowGongyongGongchengManageGroup(request)) {
%>
<a href="javascript:" style="margin-left: 40px"
	onclick="openDialogPage('manage_group_userlist.jsp?id=<%=Constants.MANAGE_GROUP_ID_GONGYONGGONGCHENG%>', 'manageGroupUserListDialog', '选择公用工程管理部人员')">公用工程管理部</a>
<%
if (manageGroupUserMap != null) {
	Set<Long> set = manageGroupUserMap.get(Constants.MANAGE_GROUP_ID_GONGYONGGONGCHENG);
	if (set != null) {
		for (Long userID : set) {
%>
<span style="margin-left: 2px; color: black;"><%=userDao.getUserByID(userID).getName()%></span>
<%
		}
	}
}
%>
<br />
<%
}
%>

<%
if (writeProblemAction.isShowKeyanJishuFuwuManageGroup(request)) {
%>
<a href="javascript:" style="margin-left: 40px"
	onclick="openDialogPage('manage_group_userlist.jsp?id=<%=Constants.MANAGE_GROUP_ID_KEYAN_JISHU_FUWU%>', 'manageGroupUserListDialog', '选择科研管理/技术服务组人员')">科研管理/技术服务组</a>
<%
if (manageGroupUserMap != null) {
	Set<Long> set = manageGroupUserMap.get(Constants.MANAGE_GROUP_ID_KEYAN_JISHU_FUWU);
	if (set != null) {
		for (Long userID : set) {
%>
<span style="margin-left: 2px; color: black;"><%=userDao.getUserByID(userID).getName()%></span>
<%
		}
	}
}
%>
<%
}
%>